package com.shopUser.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.shopUser.bean.User;

@Mapper
public interface UserMapper {

	@Insert("insert into sys_user set id=#{id},createDate=#{createDate},user_name=#{user_name},account=#{account},password=#{password},level=#{level}")
	public int insert(User user);
	@Select("select * from sys_user where id=#{id}")
	public User get(String id);
	@Delete("delete  from sys_user where id=#{id}")
	public int delete(String userId);
	
	@Select("select * from sys_user where account=#{account}")
	public User getByAccount(String account);
}
